/**
 * Created by fanzhenyu02 on 2019/11/22.
 */
public class testException {


    public static void a1 () throws Exception {
//        throw new Exception("a1 抛异常");
    }

    public static void a2 () throws Exception {
        throw new Exception("a2 抛异常");
    }

    public static void a3 () throws CommunicationException {
        throw new CommunicationException("a3 抛异常");
    }

    public static void b () throws Exception {
        a1();
        a3();
        a2();

    }


    public static void main(String[] args) {
        try{
            b();
        }catch (CommunicationException ce){
            System.out.println("CommunicationException");
        }catch (Exception e){
            System.out.println("Exception");
        }
    }


}
